package com.bjfu.service;

import com.bjfu.dto.MemberRequestDTO;
import com.bjfu.dto.UpdatePasswordDTO;
import com.bjfu.utils.Result;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;


public interface GeneralService {
    Result getAllTeammembers() ;
   // Result getAllTeamAdmins();
   Result getMemberInfo(Long userId);

    Result login(String username, String password);

    //注册成员
    Result registerTeamMember(MemberRequestDTO memberRequestDTO);

    // 检查用户注册状态
    Result checkUserStatus(Long user_id);
    Result getTeam();

    Result getArticles();

    Result getOpenAchievements();

    Result AchievementByCategory(Integer category);
    Result ArticleByCategory(Integer category);

    Result getAchievementInfo(Long achievementId);

    Result getArticleInfo(Long articleId);

    Result getMemberName(Long userId);

    Result uploadFile(MultipartFile file) throws IOException;


    /*ResponseEntity<Resource> downloadFile(Long fileId, HttpServletRequest request);*/

    Result Cancel(Long userId);

    ResponseEntity<Resource> downloadFile(String filePath, HttpServletRequest request);

    Result getErrorInfoByTypeIdAndType(Long typeId, Integer type);

    Result updatePassword(UpdatePasswordDTO updatePasswordDTO);
}
